<?php $this->headTitle('Описания, Цены, Обзоры, Драйвера');?>
<!-- Catalog -->
<div class="box">
	<div id="col-l">
		<div class="title01-top"></div>
		<div class="title01">
			<div class="title01-in">
				<!-- <p class="f-right noprint"><strong><a href="" class="add">Submit a Site</a></strong></p> -->
				<h2 class="ico-list">Разделы</h2>
			</div>
		</div>
		<div class="title01-bottom"></div>
		<div class="box">
			<?php $this->categories = array_chunk($this->categories, 3);?>
			<dl class="cat">
			<?php foreach ($this->categories[0] as $category):?>
				<dt><a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'categories', 'action' => 'list'), null, true);?>/category/<?php echo $category['CATEGORIES_ALIAS'];?>" title="<?php echo $category['CATEGORIES_TITLE'];?>"><?php echo $category['CATEGORIES_TITLE']; ?></a></dt>
				<dd>
				<?php foreach ($category['childs'] as $childCategory):?>
					<a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'categories', 'action' => 'list'), null, true);?>/category/<?php echo $childCategory['CATEGORIES_ALIAS'];?>" title="<?php echo $childCategory['CATEGORIES_TITLE'];?>"><?php echo $childCategory['CATEGORIES_TITLE'];?></a>,
				<?php endforeach;?>
				</dd>
			<?php endforeach;?>
			</dl>

			<dl class="cat f-right">
			<?php foreach ($this->categories[1] as $category):?>
				<dt><a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'categories', 'action' => 'list'), null, true);?>/category/<?php echo $category['CATEGORIES_ALIAS'];?>" title="<?php echo $category['CATEGORIES_TITLE'];?>"><?php echo $category['CATEGORIES_TITLE']; ?></a></dt>
				<dd>
				<?php if (!empty($category['childs'])):?>
				<?php foreach ($category['childs'] as $childCategory):?>
					<a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'categories', 'action' => 'list'), null, true);?>/category/<?php echo $childCategory['CATEGORIES_ALIAS'];?>" title="<?php echo $childCategory['CATEGORIES_TITLE'];?>"><?php echo $childCategory['CATEGORIES_TITLE'];?></a>,
				<?php endforeach;?>
				<?php endif;?>
				</dd>
			<?php endforeach;?>
			</dl>
		</div>
		<!-- /box -->

		<hr class="noscreen" />
	</div> <!-- /col-l -->

	<!-- Sidebar -->
	<div id="col-r" class="noprint">
		<a href="http://www.satdevice.com" title="http://www.satdevice.com" target="_blank"><img src="/images/catalogio/baner_250x250.gif" /></a>
	</div> <!-- /col-r -->
</div> <!-- /box -->
<div class="box">
	<div class="title01-top"></div>
	<div class="title01">
		<div class="title01-in">
			<h3 class="ico-info">Последние добавления</h3>
		</div>
	</div>
	<div class="title01-bottom"></div>
	<?php $this->newest = array_chunk($this->newest->toArray(), 5);?>
	<div class="col50">
	<?php if (!empty($this->newest[0])):?>
		<?php foreach ($this->newest[0] as $product):?>
		<div class="new-link">
			<p>
				<strong>
					<a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'products', 'action' => 'view'), null, true); ?>/product/<?php echo $product['PRODUCTS_ALIAS'];?>" title="<?php echo $product['BRANDS_TITLE'] . ' ' . $product['PRODUCTS_TITLE'];?>"><?php echo $product['BRANDS_TITLE'] . ' ' . $product['PRODUCTS_TITLE'];?></a>
				</strong>
			</p>
			<p>
			<span><a class="high ico-card" href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'products', 'action' => 'view'), null, true); ?>/product/<?php echo $product['PRODUCTS_ALIAS'];?>">Подробнее...</a></span>&nbsp;(<a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'categories', 'action' => 'list'), null, true); ?>/category/<?php echo $product['CATEGORIES_ALIAS'];?>" class="folder"><?php echo $product['CATEGORIES_TITLE'];?></a>)<br />
			</p>
			<p><?php echo mb_substr($product['PRODUCTS_SHORTDESCR'], 0, 160, 'utf-8');?></p>
			<hr class="noscreen" />
		</div> <!-- /new-link -->
		<?php endforeach;?>
	<?php else:?>
		Товаров пока нет
	<?php endif;?>
	</div> <!-- /col50 -->

	<div class="col50 f-right">
	<?php if (!empty($this->newest[1])):?>
		<?php foreach ($this->newest[1] as $product):?>
		<div class="new-link">
			<p>
				<strong>
					<a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'products', 'action' => 'view'), null, true); ?>/product/<?php echo $product['PRODUCTS_ALIAS'];?>" title="<?php echo $product['BRANDS_TITLE'] . ' ' . $product['PRODUCTS_TITLE'];?>"><?php echo $product['BRANDS_TITLE'] . ' ' . $product['PRODUCTS_TITLE'];?></a>
				</strong>
			</p>
			<p>
			<span><a class="high ico-card" href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'products', 'action' => 'view'), null, true); ?>/product/<?php echo $product['PRODUCTS_ALIAS'];?>">Подробнее...</a></span>&nbsp;(<a href="<?php echo $this->url(array('module' => 'catalog', 'controller' => 'categories', 'action' => 'list'), null, true); ?>/category/<?php echo $product['CATEGORIES_ALIAS'];?>" class="folder"><?php echo $product['CATEGORIES_TITLE'];?></a>)<br />
			</p>
			<p><?php echo mb_substr($product['PRODUCTS_SHORTDESCR'], 0, 160, 'utf-8');?></p>
			<hr class="noscreen" />
		</div> <!-- /new-link -->
		<?php endforeach;?>
	<?php else:?>
		Товаров пока нет
	<?php endif;?>
	</div> <!-- /col50 -->
</div> <!-- /box -->
<!--
		<p class="t-center"><a href="">Show more &raquo;</a></p>
-->